package cn.z2huo.knowledge.basic.bit.bitwiseoperation;

/**
 * <p>
 *
 * @author z2huo
 */
class AndOrInt {

    public static void main(String[] args) {
        int a = 0b0011_1100;
        int b = 0b0000_1101;
        System.out.println(a);
        System.out.println(b);
        System.out.println(Integer.toBinaryString(a));
        System.out.println(Integer.toBinaryString(b));

        System.out.println("\n以下为按位操作");
        System.out.println(a&b);
        System.out.println(a|b);
        System.out.println(a^b);
        System.out.println(~a);
        System.out.println(~b);
    }

    int a = 0b1111_0000_1010_0101;
    int b = 01_12_12;
    int c = 0xA_B_C;
    int d = 123_456_789;
}
